#define _CRT_SECURE_NO_WARNINGS 1 
#include <iostream>
#include <string>
#include <queue>
#include <vector>
#include <stack>
using namespace std;

class CQueue {
public:
	stack<int> st_in;
	stack<int> st_out;
	CQueue() {

	}

	void appendTail(int value) {
		st_in.push(value);
	}

	int deleteHead() {
		if (st_out.empty())
		{
			while (!st_in.empty())
			{
				int top = st_in.top();
				st_out.push(top);
				st_in.pop();
			}
		}
		int val = st_out.top();
		st_out.pop();
		return val;
	}
};

int main()
{
	CQueue que;
	que.appendTail(1);
	cout << que.deleteHead() << endl;

	system("pause");
	return 0;
}